package com.atguigu.vod.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author shkstart
 * @create 2022-09-28 19:55
 */
@Component
public class ConstantPropertiesUtil implements InitializingBean {

    @Value("${qcloud.vod.file.keyid}")
    private String keyId;

    @Value("${qcloud.vod.file.keysecret}")
    private String keySecret;

    public static String ACCESS_KEY_ID;
    public static String ACCESS_KEY_SECRET;

    @Override
    public void afterPropertiesSet() throws Exception {
        ACCESS_KEY_ID = keyId;
        System.out.println(ACCESS_KEY_ID);
        ACCESS_KEY_SECRET = keySecret;
        System.out.println(ACCESS_KEY_SECRET);
    }
}
